import sqlite3 from "sqlite3"

const path = process.env.NODE_ENV === 'production' ? "./data/data.db" : "./data/data.db"

export const dbConnect = new sqlite3.Database(
  path,
  sqlite3.OPEN_READWRITE,
  (err) => {
    if (err) {
      return console.log(err.message)
    }
  }
)


export default {
  dbConnect
}